Skip to content

fix(mcpx): quote zsh completion _describe entries so the script parses - #273

Merged
dezren39 merged 2 commits into
mainfrom
creator/272-zsh-completion
Oct 18, 2026
Merged

dezren39 merged 2 commits into
mainfrom
creator/272-zsh-completion

Conversation

@dezren39

@dezren39 dezren39 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Fixes #272. Port of dezren39/nix PR #379 (dezren39/darwin-nix#365) — the same defect in this repo's pkgs/mcpx copy: zshCompletion emitted each _describe commands entry unquoted, so summaries with apostrophes (server'\''s prompts), parens and glob brackets made the generated script unparseable.

Verified locally:

  • Reproduction on main a29abd3: mcpx completion zsh | zsh -n → parse error near ';;' (exit 1). With the fix: zsh -n exit 0, bash -n exit 0 (fish is not installed in the sandbox; fish generation is untouched by this change).
  • go test ./internal/cli/ — full suite green, including the 2 new tests.
  • Ablation: reverting only the quoting line (helper kept) makes TestZshCompletionCommandsAreQuoted fail with unquoted entries; restored, it passes.
  • go vet ./internal/cli/ clean; completion.go gofmt-clean (the test file lists under the sandbox's Go 1.25 gofmt exactly like the nix original and several untouched files — the repo's CI gofmt is Go 1.27 from nix-common.nix).

Summary by CodeRabbit

  • Bug Fixes
    • Improved Zsh command completion descriptions so entries containing apostrophes or colons display correctly.
  • Tests
    • Added checks to verify that Zsh completion descriptions are quoted and escaped correctly.

@dezren39
dezren39 requested a review from a team as a code owner October 18, 2026 10:40
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-18T10:40:53.871172Z fe435c8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f5af8b90-bd5c-480d-87d9-66271a2d7e76
📥 Commits

Reviewing files that changed from the base of the PR and between a29abd3 and fe435c8.

📒 Files selected for processing: 2
  • pkgs/mcpx/internal/cli/completion.go
  • pkgs/mcpx/internal/cli/completion_test.go
+---------------------------+
| Goodbye, pre-merge panic. |
+---------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@dezren39
dezren39 merged commit 98da85e into main Oct 18, 2026
15 checks passed
@dezren39
dezren39 deleted the creator/272-zsh-completion branch October 18, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcpx: zsh completion script fails to parse (unquoted _describe entries)

1 participant